package my.audition;

import java.util.Scanner;

public class AuditionDemo {
	private static int add(int begin, int end) {
		if (begin >= end) {
			System.out.println("Invalid parameters!");
			return -1;
		}
		if (begin + 1 == end) {
			System.out.println(begin + end);
			return begin + end;
		}

		int sum = end + add(begin, end - 1);
		System.out.println(sum);
		return sum;
	}

	public static void main(String[] args) {
		add(1, 100);

		Scanner keyboard = new Scanner(System.in);
		System.out.println("Enter your name: ");
		String name = keyboard.next();

		System.out.println("Enter your age: ");
		int age = keyboard.nextInt();

		System.out.println("Enter your nickname: ");
		String nickName = keyboard.next();

		System.out.println("name:" + name);
		System.out.println("age:" + age);
		System.out.println("nickName:" + nickName);
	}
}
